package cn.yitun.chat.yitunservercommonlib.converter.dto2po.group;

import cn.yitun.chat.yitunservercommonlib.dataentity.dto.group.GroupRelationDto;
import cn.yitun.chat.yitunservercommonlib.dataentity.po.group.GroupRelationInfo;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 群组分类
 */
@Mapper(componentModel = "spring")
public interface GroupCategoryMemberDto2PoConverter {
    GroupCategoryMemberDto2PoConverter INSTANCE = Mappers.getMapper(GroupCategoryMemberDto2PoConverter.class);

    GroupRelationDto do2dto(GroupRelationInfo info);

    List<GroupRelationDto> do2dto(List<GroupRelationInfo> doList);

    @InheritInverseConfiguration
    GroupRelationInfo dto2do(GroupRelationDto dto);
    @InheritInverseConfiguration
    List<GroupRelationInfo> dto2do(List<GroupRelationDto> dtoList);
}
